package startup

import (
	"git.mycaigou.com/gfyx/micro-gfyx-bigdata-service/infrastructure/vars"
	"git.myscrm.cn/golang/stark/v4/module/helper"
)

// SetupVars 加载变量
func SetupVars() error {
	var err error
	//starrows 连接
	if vars.StarRocksDbSetting != nil && vars.StarRocksDbSetting.Host != "" {
		vars.StarRocksDbSetting.ParseTime = true
		vars.StarRocksDbConn, err = helper.NewMySQLConn(vars.StarRocksDbSetting)
		if err != nil {
			return err
		}
	}

	return nil
}
